import React, { useState } from 'react'

export default function App() {
  const [isHot , setIsHot] = useState(true)
  return (
    <div>
        <h1>今天真{isHot?'热':'冷'}啊</h1>
        <button onClick = {() => {setIsHot(!isHot)}}>点击切换天气</button>
    </div>
  )
}
